package fr.maistre.TestMarché;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Date;

public class Sauvegarde {

	Date dateSauvegarde;
	String nomSauvegarde;
	Object data;
	
	public void sauvegarder(Serializable serializable) throws IOException{
		File fichier = new File("partie.txt");
		try {
			final ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(fichier));
			oos.writeObject(serializable);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
